import Base from '@/services/base'

export default class msgService extends Base {
    constructor(auth,showloading){
        super(auth,showloading);
    }
	
	//我创建的消息列表
	async getMyCreateMail(param) {
	    return await this.fly.get('api/websiteMail/getMyCreateMailS',param);
	}
	
	//我收到的消息列表
	async getMailList(param) {
	    return await this.fly.get('api/websiteMail/getMailList',param);
	}
	
	//获取届列表
	async period() {
	    return await this.fly.get('/api/report/period');
	}
	
	//获取届下的tabs
	async getOptionOrg(param) {
	    return await this.fly.get('api/websiteMail/getOptionOrg',param);
	}
	
	//获取对应级别的数据列表
	async getOrgTree(param) {
	    return await this.fly.get('api/websiteMail/getOrgTree',param);
	}
	
	//发送消息
	async addWebsiteMail(param) {
	    return await this.fly.post('api/websiteMail/addWebsiteMail',param);
	}
	
	//删除
	async delWebsiteMail(param) {
	    return await this.fly.get('api/websiteMail/delWebsiteMail',param);
	}
	
	//撤回
	async recallWebsiteMail(param) {
	    return await this.fly.get('api/websiteMail/recallWebsiteMail',param);
	}
	
	//撤回后再次发送
	async updateWebsiteMail(param) {
	    return await this.fly.post('api/websiteMail/updateWebsiteMail',param);
	}
	
	//站内信已读
	async readWebsite(param) {
	    return await this.fly.get('api/websiteMail/readWebsite',param);
	}
	
	//获取发送消息详情
	async getMailDetail(param) {
	    return await this.fly.post('api/websiteMail/getMailDetail',param);
	}
	
	//答疑消息详情
	async errorCollectionReply(param) {
	    return await this.fly.post('api/exam/errorCollectionReply',param);
	}
	
	//系统公告
	async notice(){
		return await this.fly.get('api/start/notice');
	}
	
	//上报学习时长统计
	async reportPageData(params){
		return await this.fly.post('api/start/syncPageRecord',params);
	}
	
	///api/home/getNoticeDetail?typeId=51b9bccf085b4d888a6ac307f70773fa
	async getNoticeDetail(params){
		return await this.fly.get('api/home/getNoticeDetail',params);
	}
	
	
}
